<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas" width="500" height="400"></canvas>
</body>
<!-- uniform 是 GLSL 中的一种变量类型限定符，用于存储应用程序通过 GLSL 传递给着色器的只读值。 -->
<!-- 传递给着色器的在所有的顶点着色器和片段着色器中保持不变的的任何参数，基本上都应该通过 uniform 来存储 -->
<!-- uniform 变量在全局区声明 -->
<script id = "vertex-shader" type="notjs">
    attribute vec4 a_position;
    uniform mat4 u_matrix4;

    attribute vec4 a_color;
    varying vec4 v_color;
    void main() {
        gl_Position = u_matrix4 * a_position;
        v_color = a_color * u_matrix4;
    }
</script>
<script id = "fragment-shader" type="notjs">
    precision mediump float;
    varying vec4 v_color;
    
    void main() {
        gl_FragColor = v_color;
    }
</script>
<script src="../lib/webgl-debug.js"></script>
<script src="../lib/webgl-utils.js"></script>
<script src="../lib/cuon-matrix.js"></script>
<script src="../lib/cuon-utils.js"></script>
<script src="../utils.js"></script>
<script src="./transform.js"></script>
</html>